<?php
/**
 * Created by PhpStorm.
 * User: Marte
 * Date: 2019/6/25
 * Time: 23:13
 */

namespace Mulin\Bean;


class Route
{
    private static $route;
    private static $instance;
    private function __construct()
    {

    }
    public static function get_instance()
    {
        if (is_null(self::$instance)) {
            self::$instance=new self();
        }
         return self::$instance;
    }

    /**
     * 添加一个路由
     */
    public static function set($address, $routeInfo)
    {
        self::$route[$address] = $routeInfo;
    }

    /**
     * 获取一个路由
     */
    public static function get($address)
    {
        return self::$route[$address];
    }
}